import {createRouter, createWebHistory} from 'vue-router'
import AdminLayout from '../layout/AdminLayout.vue'
import Home from '../views/Home.vue'

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: "/",
            redirect: "/jboltai"
        },
        {
            path: '/aiApp/:appSn',
            name: 'ai_app',
            component: () => import('../views/app/index.vue')
        },
        {
            path: '/aiApp-1/:appId',
            name: 'ai_app_1',
            component: () => import('../views/app/app-1.vue')
        },
        {
            path: '/jboltai',
            component: AdminLayout,
            children: [
                {
                    path: '',
                    name: 'home',
                    component: Home
                },

                {
                    path: 'resources',
                    name: 'aiResources',
                    component: () => import('../views/ai_resource/index.vue')
                },
                {
                    path: 'file',
                    name: 'aiFile',
                    component: () => import('../views/ai_file/index.vue')
                },
                {
                    path: 'doc',
                    name: 'aiDoc',
                    component: () => import('../views/ai_doc/index.vue')
                },
                {
                    path: 'knowledge_base',
                    name: 'aiKnowledgeBase',
                    component: () => import('../views/ai_knowledge_base/index.vue')
                },
                {
                    path: 'app',
                    name: 'app',
                    component: () => import('../views/ai_app/index.vue')
                },
                {
                    path: '/app/design/:appId',
                    name: 'design',
                    component: () => import('../views/app/chain/index.vue')
                },
                {
                    path: 'chat',
                    name: 'chat',
                    component: () => import('../views/chat/index.vue')
                },

                {
                    path: 'function_call',
                    name: 'function_call',
                    component: () => import('../views/function_call/index.vue')
                },
                {
                    path: 'vdb',
                    name: 'vdb',
                    component: () => import('../views/vdb/index.vue')
                },
                {
                    path: 'file_extract',
                    name: 'file_extract',
                    component: () => import('../views/file_extract/index.vue')
                },
                {
                    path: 'file_split',
                    name: 'file_split',
                    component: () => import('../views/file_split/index.vue')
                },
            ]
        },
        {
            path: '/base',
            component: AdminLayout,
            children: [
                {
                    path: 'info',
                    name: 'baseInfo',
                    component: () => import('../views/base_info/index.vue')
                },
                {
                    path: 'blinfo',
                    name: 'baseblInfo',
                    component: () => import('../views/base_info/bl/blindex.vue')
                },
                {
                    path: 'openinfo',
                    name: 'baseopenInfo',
                    component: () => import('../views/base_info/open/opindex.vue')
                },
                {
                    path: 'keys',
                    name: 'basekeys',
                    component: () => import('../views/base_info/keys/index.vue')
                }
            ]
        },
        {
            path: '/comp',
            component: AdminLayout,
            children: [
                {
                    path: 'cert',
                    name: 'compcert',
                    component: () => import('../views/comp_cert/index.vue')
                },
                {
                    path: 'fina',
                    name: 'compfina',
                    component: () => import('../views/comp_fina/index.vue')
                },
                {
                    path: 'perf',
                    name: 'compperf',
                    component: () => import('../views/comp_perf/index.vue')
                },
                {
                    path: 'persons',
                    name: 'comppersons',
                    component: () => import('../views/comp_persons/index.vue')
                }
            ]
        },
        {
            path: '/bs',
            component: AdminLayout,
            children: [
                {
                    path: 'notice',
                    name: 'bsnotice',
                    component: () => import('../views/bid/notice/index.vue')
                },
                {
                    path: 'collect',
                    name: 'bscollect',
                    component: () => import('../views/bid/collect/index.vue')
                },
                {
                    path: 'substrunct',
                    name: 'bssubstrunct',
                    component: () => import('../views/bid/subscribe/index.vue')
                },
                {
                    path: 'recommend',
                    name: 'bsrecommend',
                    component: () => import('../views/bid/recommend/index.vue')
                }
            ]
        },

  ]
})

export default router
